package twu.shubham.library;


public class MembersRecord {

    public int libraryNumber;
    private String password;
    private String username;
    private String contactNumber;
    private String email;

    public MembersRecord(int libraryNumber,String username, String contactNumber, String email)
    {
        this.libraryNumber = libraryNumber;
        this.username = username;
        this.contactNumber = contactNumber;
        this.email = email;
     }

    public int passwordGenerator()
    {
        if(libraryNumber > 1111110)
        {
            this.password = this.username;
            return 1;
        }
        return 0;
    }

    public int checkForPassword(String password) {

        if(libraryNumber > 1111110)
        {
            if(this.password.equals(password))
            {
            return 1;

            }
        }
        return 0;

    }

    public String printDetail() {

            return (username + "\t" + email+"\t"+contactNumber);

    }
}
